<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script src="https://lib.baomitu.com/Turf.js/latest/turf.min.js"></script>
</head>

<body>
  <script>
    /* 判断一个点是否在一个区域里面 */
    var point = turf.point([114, 30]);
    var polygon = turf.polygon([
      [

        [115, 40],
        [115, 39],
        [116, 39],
        [116, 40],
        [115, 40],
        [115, 40]

      ]
    ])
    console.log(polygon)
    //第一个几何图形是否完成包含第二个几何图形 包含则返回true,不包含返回false
    var result = turf.booleanContains(polygon, point);
    console.log(result)
  </script>
</body>

</html>